package com.cai.commons.exception;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by GJ on 2017/6/20.
 */
@ControllerAdvice
public class DefaultException {
    @ResponseBody
    @ExceptionHandler(Exception.class)
    public String defaultE(Exception e){
        System.out.println(e.getMessage());
         return "服务器繁忙，请稍后再试！";
    }
}
